package com.hirsi.core.constant;

/**
 * Redis Key Value常量类
 */
public class RedisConstant {

    //图形验证码key前缀(tag)
    public final static String CAPTCHA_KEY_PREFIX = "CAPTCHA:%s";

    //图形验证码过期时间（单位：秒）
    public final static int CAPTCHA_EXPIRE_TIME = 5 * 60;

    //访问令牌key前缀(id)
    public final static String ACCESS_TOKEN_KEY_PREFIX = "ACCESS_TOKEN:%s";

    //访问令牌过期时间默认2小时（单位：秒）
    public final static long ACCESS_TOKEN_EXPIRE_TIME = 60 * 60 * 2;

    //刷新令牌key前缀(id)
    public final static String REFRESH_TOKEN_KEY_PREFIX = "REFRESH_TOKEN:%s";

    //刷新令牌过期时间默认7天（单位：秒）
    public final static long REFRESH_TOKEN_EXPIRE_TIME = 60 * 60 * 24 * 7;

    //短信验证码key前缀(applicationName:phone)
    public final static String PHONE_COKE_KEY_PREFIX = "PHONE_CODE:%s:%s";

    //短信验证码过期时间(单位：秒)
    public final static int PHONE_COKE_EXPIRE_TIME = 15 * 60;
}
